import axios from "./axios";

let graphic={
    query:(params?:any)=>{
        return axios({
            method:"GET",
            url:"/user",
            params
        })
    },
    del:(id:any)=>{
        return axios({
            method:"DELETE",
            url:"/user/"+id,
            
        })
    },
    add:(data:any)=>{
        return axios({
            method:"post",
            url:"/user",
            data
        })
    },
    patch:(data:any)=>{
        return axios({
            method:"PATCH",
            url:"/user/"+data.id,
            data
        })
    },
    userintegral:(params:any)=>{
        return axios({
            method:"get",
            url:"userintegral",
            params
        })
    },
    usergrowth:(params:any)=>{
        return axios({
            method:"get",
            url:"usergrowth",
            params
        })
    },
    usercoupons:(params:any)=>{
        return axios({
            method:"get",
            url:"usercoupons",
            params
        })
    },
    delusercoupons:(id:any)=>{
        return axios({
            method:"delete",
            url:"usercoupons/"+id,
        })
    },
    userorder:(params:any)=>{
        return axios({
            method:"get",
            url:"userorder",
            params
        })
    }
}
export default graphic